﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Atosenet.Utility
{
    public class LogTracer : MultiExecutorQueue<string>
    {
        #region 成员

        

        #endregion


        #region 初始化

        public LogTracer()
        { }

        #endregion


        #region 公开函数

        public bool AddTracer(IExecutor<string> tracer)
        {
            if (tracer == null)
                return false;

            return this.AddExecutor(tracer);
        }

        public bool RemoveTracer(IExecutor<string> tracer)
        {
            if (tracer == null)
                return false;

            return this.RemoveExecutor(tracer.Name);
        }

        public void Trace(string msg)
        {
            this.Execute(msg);
        }

        public bool SetTracerEnable(string name, bool enable)
        {
            return this.SetExecutorEnable(name, enable);
        }

        #endregion


        #region 核心函数

        protected override bool VerifyData(string data)
        {
            return !string.IsNullOrEmpty(data);
        }

        #endregion


        #region 属性



        #endregion
    }
}
